package jnpf.service;




import jnpf.model.common.AnalyzeResult;
import jnpf.model.common.TalkRequest;
import jnpf.model.dify.talk.req.FlowTalkReq;
import jnpf.model.dify.talk.req.ReNameReq;
import jnpf.model.dify.talk.req.UserReq;
import jnpf.model.dify.talk.resp.DifyTalkListConvertResp;
import jnpf.model.dify.talk.resp.TalkHistoryResp;
import reactor.core.publisher.Flux;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * @author zpw
 */
public interface DifyTalkService {

    /**
     * 管理模型创建AI对话-流式
     */
    Flux<String> streamTalkAI(TalkRequest talkRequest) ;

    /**，
     * 阻塞式对话
     */
    AnalyzeResult docTalkAi(FlowTalkReq flowTalkReq, Integer aiTypeId) ;

    /**
     * 上传文件
     */
    String uploadFile(File file) throws Exception;

    /** 终止对话*/
    String stopChat(String taskId) throws Exception;

    /** 消息点赞*/
    String likeMessage(String messageId, Map<String, Object> requestParams) throws Exception;

    /** 获取下一轮建议问题列表*/
    String getSuggestedQuestions(String messageId, Map<String, Object> requestParams) throws Exception;

    /**
     * 获取会话历史消息
     */
    List<TalkHistoryResp> getChatHistoryMessages(String talkId, Integer aiType) throws Exception;

    /** 获取会话列表*/
    List<DifyTalkListConvertResp> getConversationList(Integer aiType) throws Exception;

    /** 删除会话*/
    String deleteConversation(String conversationId, Integer aiType) throws Exception;

    /** 会话重命名*/
    String renameConversation(ReNameReq reNameReq, Integer aiType) throws Exception;

    /** 语音转文字*/
    String audioToText(Map<String, Object> requestParams) throws Exception;

    /** 文字转语音*/
    String textToAudio(Map<String, Object> requestParams) throws Exception;

    /** 获取应用配置信息*/
    String getAppParameters(UserReq requestParams) throws Exception;

    /** 获取应用Meta信息*/
    String getAppMeta(Map<String, Object> requestParams) throws Exception;


}
